//package test.pcs;
//
//import com.google.gson.Gson;
//import com.payment.lc.pcs.common.enums.BizType;
//import com.payment.lc.pcs.rule.domain.MaintainParam;
//import com.payment.lc.pcs.rule.maintain.MaintainRuleService;
//import com.payment.lc.pcs.service.api.DateTypeService;
//import com.payment.lc.pcs.service.api.MaintainService;
//import com.payment.lc.pcs.service.api.ProductionService;
//import com.payment.lc.pcs.service.domain.DateTypeInfo;
//import com.payment.lc.pcs.service.domain.MaintainInfo;
//import com.payment.lc.pcs.service.domain.Production;
//import com.payment.lc.pcs.util.DateComputeUtil;
//import org.junit.After;
//import org.junit.Before;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//
//import java.text.SimpleDateFormat;
//import java.util.Date;
//import java.util.List;
//
///**
// * Created on 2016/8/8.
// */
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = "classpath:context-ws.xml")
//public class TransactionDao {
//
//    Gson gson = new Gson();
//
//    @Autowired
//    ProductionService productionService;
//
//    @Autowired
//    MaintainService maintainService;
//
//    @Autowired
//    MaintainRuleService maintainRuleService;
//
//    @Autowired
//    DateTypeService dateTypeService;
//
//    @Autowired
//    DateComputeUtil dateComputeUtil;
//
//    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//
//
//    @Test
//    public void test() {
//        test5();
//    }
//
//    void test5(){
//        try {
//            String date = "2016-8-15";
//            Date start = sdf.parse(date);
//            Date target = dateComputeUtil.computeTradeDay(start, 5);
//            System.out.println("sdf.format(target) = " + sdf.format(target));
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//
//    void test4(){
//        DateTypeInfo dateTyeInfos = dateTypeService.getDateTyeInfos();
//        System.out.println(gson.toJson(dateTyeInfos));
//    }
//
//    void test3() {
//        Production fp16003 = productionService.getProduction("FP16003");
//        System.out.println(gson.toJson(fp16003));
//    }
//
//    void test2() {
//        System.out.println("maintainRuleService = " + maintainRuleService);
//        MaintainParam param = new MaintainParam();
//        param.setProductionCode("FI16002");
//        param.setBizType(BizType.Fundin);
//        param.setChannelCode("EFUNDS101");
//        param.setBankCode("SZPAB");
//        List<MaintainInfo> matchMaintainInfos = maintainRuleService.getMatchMaintainInfos(param);
//        System.out.println("matchMaintainInfos = " + matchMaintainInfos);
//        System.out.println("matchMaintainInfos.size() = " + matchMaintainInfos.size());
//    }
//
//    public void test1() {
//        List<MaintainInfo> maintainInfo = maintainService.getMaintainInfo();
//        System.out.println("gson.toJson(maintainInfo) = " + gson.toJson(maintainInfo));
//    }
//
//    @Before
//    public void before() {
//        System.out.println("--------------------------");
//        System.out.println("--------------------------");
//    }
//
//    @After
//    public void after() {
//        System.out.println("--------------------------");
//        System.out.println("--------------------------");
//    }
//}
